package milkproduction.to;

public class FinishedProductionTO {
	private int finishedProductionNo;
	private int quantity;
	private String productDate;
	private int rowMilkNo;
	private int containerNo;
	private int releaseNo;
	private RowMilkTO rowMilk;
	private ContainerTO container;
	private ReleaseTO release;
	
	public FinishedProductionTO(){}

	public FinishedProductionTO(int finishedProductionNo, int quantity,
			String productDate, int rowMilkNo, int containerNo, int releaseNo) {
		super();
		this.finishedProductionNo = finishedProductionNo;
		this.quantity = quantity;
		this.productDate = productDate;
		this.rowMilkNo = rowMilkNo;
		this.containerNo = containerNo;
		this.releaseNo = releaseNo;
	}

	public FinishedProductionTO(int finishedProductionNo, int quantity,
			String productDate, int rowMilkNo, int containerNo, int releaseNo,
			RowMilkTO rowMilk, ContainerTO container, ReleaseTO release) {
		super();
		this.finishedProductionNo = finishedProductionNo;
		this.quantity = quantity;
		this.productDate = productDate;
		this.rowMilkNo = rowMilkNo;
		this.containerNo = containerNo;
		this.releaseNo = releaseNo;
		this.rowMilk = rowMilk;
		this.container = container;
		this.release = release;
	}

	public int getFinishedProductionNo() {
		return finishedProductionNo;
	}

	public void setFinishedProductionNo(int finishedProductionNo) {
		this.finishedProductionNo = finishedProductionNo;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public String getProductDate() {
		return productDate;
	}

	public void setProductDate(String productDate) {
		this.productDate = productDate;
	}

	public int getRowMilkNo() {
		return rowMilkNo;
	}

	public void setRowMilkNo(int rowMilkNo) {
		this.rowMilkNo = rowMilkNo;
	}

	public int getContainerNo() {
		return containerNo;
	}

	public void setContainerNo(int containerNo) {
		this.containerNo = containerNo;
	}

	public int getReleaseNo() {
		return releaseNo;
	}

	public void setReleaseNo(int releaseNo) {
		this.releaseNo = releaseNo;
	}

	public RowMilkTO getRowMilk() {
		return rowMilk;
	}

	public void setRowMilk(RowMilkTO rowMilk) {
		this.rowMilk = rowMilk;
	}

	public ContainerTO getContainer() {
		return container;
	}

	public void setContainer(ContainerTO container) {
		this.container = container;
	}

	public ReleaseTO getRelease() {
		return release;
	}

	public void setRelease(ReleaseTO release) {
		this.release = release;
	}

	@Override
	public String toString() {
		return "FinishedProductionTO [finishedProductionNo="
				+ finishedProductionNo + ", quantity=" + quantity
				+ ", productDate=" + productDate + ", rowMilkNo=" + rowMilkNo
				+ ", containerNo=" + containerNo + ", releaseNo=" + releaseNo
				+ ", rowMilk=" + rowMilk + ", container=" + container
				+ ", release=" + release + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((container == null) ? 0 : container.hashCode());
		result = prime * result + containerNo;
		result = prime * result + finishedProductionNo;
		result = prime * result
				+ ((productDate == null) ? 0 : productDate.hashCode());
		result = prime * result + quantity;
		result = prime * result + ((release == null) ? 0 : release.hashCode());
		result = prime * result + releaseNo;
		result = prime * result + ((rowMilk == null) ? 0 : rowMilk.hashCode());
		result = prime * result + rowMilkNo;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FinishedProductionTO other = (FinishedProductionTO) obj;
		if (container == null) {
			if (other.container != null)
				return false;
		} else if (!container.equals(other.container))
			return false;
		if (containerNo != other.containerNo)
			return false;
		if (finishedProductionNo != other.finishedProductionNo)
			return false;
		if (productDate == null) {
			if (other.productDate != null)
				return false;
		} else if (!productDate.equals(other.productDate))
			return false;
		if (quantity != other.quantity)
			return false;
		if (release == null) {
			if (other.release != null)
				return false;
		} else if (!release.equals(other.release))
			return false;
		if (releaseNo != other.releaseNo)
			return false;
		if (rowMilk == null) {
			if (other.rowMilk != null)
				return false;
		} else if (!rowMilk.equals(other.rowMilk))
			return false;
		if (rowMilkNo != other.rowMilkNo)
			return false;
		return true;
	}

	
	
}
